package com.hantanger.weblog.model;

import com.googlecode.objectify.annotation.Cache;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;

@Cache
@Entity
public class Category {
	//日志分类信息，可以有多级分类
	
	public static final String DEFCATEGORYNAME = "默认分类";
	
	//子分类与其上级分类之间的分隔符, metaweblog中使用。分类名不允许含有这个字符串
	public static final String SEP = "--";

	@Id private Long id;
	
	private String name;// 分类名称
	
	private int allCount;//   所有日志数量
	
	private int publicCount;//  公开的日志数量
	
	private int publishedCount;// 已经发布的日志数量

	private String subCategorys;// 子分类id顺序字符串,以逗号分隔
	
	private long parentId;//  父分类

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAllCount() {
		return allCount;
	}

	public void setAllCount(int allCount) {
		this.allCount = allCount;
	}

	public int getPublicCount() {
		return publicCount;
	}

	public void setPublicCount(int publicCount) {
		this.publicCount = publicCount;
	}

	public int getPublishedCount() {
		return publishedCount;
	}

	public void setPublishedCount(int publishedCount) {
		this.publishedCount = publishedCount;
	}

	public String getSubCategorys() {
		return subCategorys;
	}

	public void setSubCategorys(String subCategorys) {
		this.subCategorys = subCategorys;
	}

	public long getParentId() {
		return parentId;
	}

	public void setParentId(long parentId) {
		this.parentId = parentId;
	}
}
